﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:Framework.UI.Controls"
                    xmlns:metro="http://schemas.codeplex.com/elysium">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Elysium;component/Themes/Generic.xaml"/>
        <ResourceDictionary Source="/Framework.UI;component/Themes/WPF/Base/FocusVisualStyle.xaml"/>
        <ResourceDictionary Source="/Framework.UI;component/Themes/ElysiumExtra/Icon.xaml"/>
        <ResourceDictionary Source="/Framework.UI;component/Themes/ElysiumExtra/GeometryIcon.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="DefaultDropDownCommandButtonStyle" BasedOn="{StaticResource {x:Type metro:DropDownCommandButton}}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Background" Value="{StaticResource TransparentBrush}"/>
        <Setter Property="FocusVisualStyle" Value="{StaticResource {x:Static SystemParameters.FocusVisualStyleKey}}"/>
        <Style.Triggers>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{StaticResource AccentBrush}"/>
                <Setter Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- DropDownCommandButton -->
    <Style x:Key="MediumIconDropDownCommandButtonStyle" BasedOn="{StaticResource DefaultDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Style.Resources>
            <DataTemplate x:Key="PressedContentTemplate">
                <controls:Icon Foreground="{StaticResource ContrastBrush}"
                               Size="Medium"
                               Style="{Binding}"/>
            </DataTemplate>
            <DataTemplate x:Key="DisabledContentTemplate">
                <controls:Icon Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type metro:DropDownCommandButton}}, Path=BorderBrush, Mode=OneWay}"
                               Size="Medium"
                               Style="{Binding}"/>
            </DataTemplate>
        </Style.Resources>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <controls:Icon Size="Medium" 
                                   Style="{Binding}"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="DropDownDirection" Value="Down"/>
        <Style.Triggers>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="ContentTemplate" Value="{StaticResource PressedContentTemplate}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="ContentTemplate" Value="{StaticResource DisabledContentTemplate}"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="SmallIconDropDownCommandButtonStyle" BasedOn="{StaticResource DefaultDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Style.Resources>
            <DataTemplate x:Key="PressedContentTemplate">
                <controls:Icon Foreground="{StaticResource ContrastBrush}"
                               Size="Small"
                               Style="{Binding}"/>
            </DataTemplate>
            <DataTemplate x:Key="DisabledContentTemplate">
                <controls:Icon Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type metro:DropDownCommandButton}}, Path=BorderBrush, Mode=OneWay}"
                               Size="Small"
                               Style="{Binding}"/>
            </DataTemplate>
        </Style.Resources>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <controls:Icon Size="Small" 
                                   Style="{Binding}"/>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="DropDownDirection" Value="Down"/>
        <Style.Triggers>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="ContentTemplate" Value="{StaticResource PressedContentTemplate}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="ContentTemplate" Value="{StaticResource DisabledContentTemplate}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="NewDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource NewItemIconStyle}"/>
        <Setter Property="Header" Value="New"/>
    </Style>
    <Style x:Key="ExpandCollapseDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource ExpandCollapseIconStyle}"/>
        <Setter Property="Header" Value="Expand/Collapse"/>
    </Style>
    <Style x:Key="ExportDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource Export1IconStyle}"/>
        <Setter Property="Header" Value="Export"/>
    </Style>
    <Style x:Key="PrintDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource PrintIconStyle}"/>
        <Setter Property="Header" Value="Print"/>
    </Style>
    <Style x:Key="SaveDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource Save1IconStyle}"/>
        <Setter Property="Header" Value="Save"/>
    </Style>
    <Style x:Key="SettingsDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource Settings1IconStyle}"/>
        <Setter Property="Header" Value="Settings"/>
    </Style>
    <Style x:Key="ZoomDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource ZoomIconStyle}"/>
        <Setter Property="Header" Value="Zoom"/>
    </Style>
    <Style x:Key="DisplayDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource Monitor1IconStyle}"/>
        <Setter Property="Header" Value="Display"/>
    </Style>
    <Style x:Key="ViewDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource ViewIconStyle}"/>
        <Setter Property="Header" Value="View"/>
    </Style>
    <Style x:Key="AlignDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource TextJustifyAlignIconStyle}"/>
        <Setter Property="Header" Value="Align"/>
    </Style>
    <Style x:Key="RemoveDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource SubtractIconStyle}"/>
        <Setter Property="Header" Value="Remove"/>
    </Style>
    <Style x:Key="FontSizeDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource FontSizeIconStyle}"/>
        <Setter Property="Header" Value="Font Size"/>
    </Style>
    <Style x:Key="ListDropDownCommandButtonStyle" BasedOn="{StaticResource MediumIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource ListIconStyle}"/>
        <Setter Property="Header" Value="List"/>
    </Style>

    <!-- Small DropDownCommandButton -->
    <Style x:Key="NewDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource NewItemIconStyle}"/>
        <Setter Property="ToolTip" Value="New"/>
    </Style>
    <Style x:Key="ExpandCollapseDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource ExpandCollapseIconStyle}"/>
        <Setter Property="ToolTip" Value="Expand/Collapse"/>
    </Style>
    <Style x:Key="ExportDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource Export1IconStyle}"/>
        <Setter Property="ToolTip" Value="Export"/>
    </Style>
    <Style x:Key="PrintDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource PrintIconStyle}"/>
        <Setter Property="ToolTip" Value="Print"/>
    </Style>
    <Style x:Key="SaveDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource Save1IconStyle}"/>
        <Setter Property="ToolTip" Value="Save"/>
    </Style>
    <Style x:Key="SettingsDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource Settings1IconStyle}"/>
        <Setter Property="ToolTip" Value="Settings"/>
    </Style>
    <Style x:Key="ZoomDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource ZoomIconStyle}"/>
        <Setter Property="ToolTip" Value="Zoom"/>
    </Style>
    <Style x:Key="DisplayDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource Monitor1IconStyle}"/>
        <Setter Property="ToolTip" Value="Display"/>
    </Style>
    <Style x:Key="ViewDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource ViewIconStyle}"/>
        <Setter Property="ToolTip" Value="View"/>
    </Style>
    <Style x:Key="AlignDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource TextJustifyAlignIconStyle}"/>
        <Setter Property="ToolTip" Value="Align"/>
    </Style>
    <Style x:Key="RemoveDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource SubtractIconStyle}"/>
        <Setter Property="ToolTip" Value="Remove"/>
    </Style>
    <Style x:Key="FontSizeDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource FontSizeIconStyle}"/>
        <Setter Property="ToolTip" Value="Font Size"/>
    </Style>
    <Style x:Key="ListDropDownSmallCommandButtonStyle" BasedOn="{StaticResource SmallIconDropDownCommandButtonStyle}" TargetType="{x:Type metro:DropDownCommandButton}">
        <Setter Property="Content" Value="{StaticResource ListIconStyle}"/>
        <Setter Property="ToolTip" Value="List"/>
    </Style>

</ResourceDictionary>